public with sharing class FinanceAgreementEXTTest 
{
	static testmethod void verifyPost() 
	{
		string rt = ''; 
		string rt1 = '';
		list<String> lstFilters = new List<String>();
		lstFilters.add('All');
		lstFilters.add('Active');
		lstFilters.add('Pending');
		lstFilters.add('Canceled');
		lstFilters.add('Paid in full');
		lstFilters.add('On Hold');
		lstFilters.add('Deactivated');
		lstFilters.add('Late Notice');		
		integer Count = 0;
		
		For(RecordType client :[Select Id from RecordType Where recordtype.name = 'Client'])
		{
			rt = client.Id;
		}		
		
		For(RecordType client :[Select Id from RecordType Where recordtype.name = 'agency'])
		{
			rt1 = client.Id;
		}		
		
		Account act = new Account(email__c = 'no@email.com', recordtypeId = rt, drivers_license__c = '123456789', name='smith');
		Insert act; 
		
		Account act1 = act.clone();
		act1.RecordTypeId = rt1;
		act.name = 'Acme';
		Insert act1; 
		
		Contact con = new Contact(firstname = 'John', LastName = 'Doe');
		Insert con;
		
		Policy__c pol = new Policy__c(name='test', account__c = act.Id, agent__c = act1.Id);
		insert pol;
		
		test.startTest();
		ApexPages.StandardController sc = new ApexPages.standardController(act);		
		FinanceAgreementEXT inClass = new FinanceAgreementEXT(sc);
		inClass.getfinAgr();
		inClass.newLink();		
		inClass.Beginning();
		inClass.End();
		inClass.getDisableNext();
		inClass.getDisablePrevious();
		inClass.getFilter();
		inClass.getFilters();
		inClass.getPageNumber();
		inClass.getTotal_size();
		inClass.getTotalPages();
		inClass.Next();
		inClass.Previous();
		inClass.setFilters(lstFilters[0]);
		inclass.filters = lstFilters[0];
		inClass.searchTerm = 'Smith';
		inClass.getsearchTerm();
		inClass.setsearchTerm('Smith');
		inClass.doSearch();						
		inClass.queryString = 'Select z from Test';
		inClass.getfinAgr();	
		string getFilterTest = inClass.getFilters();
		
		For(string lstStr : lstFilters)
		{
			inClass.filters = lstStr;
			inClass.getfinAgr();
			Count +=1;
		}		
		
		test.stopTest();
	}
}